package ooday05;
/** 简化版季节枚举类测试*/
public class Enumtest {
    public static void main(String[] args) {
        Seasons[] seasons = Seasons.values();//获取枚举类对象数组
        for (int i = 0; i < seasons.length; i++) {
            System.out.println(seasons[i]);//遍历输出枚举类对象

        }

        Seasons s = Seasons.SPRING;///获取枚举类对象
        switch (s){
            case SPRING:
                System.out.println("春天来了！！！");
                break;
            case SUMMER:
                System.out.println("夏天来了！！！");
                break;
            case AUTUMN:
                System.out.println("秋天来了！！！");
                break;
            case WINTER:
                System.out.println("冬天来了！！！");
                break;
        }

    }
}
